﻿using Gp.Scripts.Equip;

namespace Gp.Scripts.Core {
    public class ChangeWeaponGestureTrigger : UnitGestureTrigger {
        private readonly WeaponEntity _entity;
        
        
        public ChangeWeaponGestureTrigger(WeaponEntity entity) {
            _entity = entity;
        }


        public override void OnTrigger() {
            Animator.SetTrigger(UnitAnimatorParameter.WeaponChangeTrigger);


            // var weaponModel = _entity.Config.UnitWeaponModel;
            // var weaponPivot = Model.GetComponent<CombatantWeaponPivot>();
            // if (weaponPivot == null) return;
            //
            //
            // // 设置动画机参数
            // // 切换武器模型
            // int codeNumber = weaponPivot.SwitchWeaponModel(weaponModel, _entity);
            // Animator.SetFloat(UnitAnimatorParameter.CurWeapon, codeNumber);
        }
    }
}